package cn.tedu.wufl.xcw.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class ContentParam {

    @ApiModelProperty(value = "id", required = false)
    private Integer id;

    @ApiModelProperty(value = "分类id", required = true)
    @NotNull(message = "分类id不能为空")
    private Integer categoryId;

    @ApiModelProperty(value = "标题", required = true)
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "摘要", required = true)
    @NotBlank(message = "摘要不能为空")
    private String brief;

    @ApiModelProperty(value = "关键字", required = true)
    @NotBlank(message = "关键字不能为空")
    private String keywords;

    @ApiModelProperty(value = "序号", required = true)
    @NotNull(message = "序号不能为空")
    private Integer sort;

    @ApiModelProperty(value = "封面", required = true)
    @NotBlank(message = "封面不能为空")
    private String coverUrl;

    @ApiModelProperty(value = "详情", required = true)
    @NotBlank(message = "详情不能为空")
    private String detail;

}

